import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    { path: '/Login', name: 'Login', component: () => import('@/components/Login/Login') },
    { path: '/Index', name: 'Index', component: () => import('@/components/Index/Index') },
    {
      path: '/',
      name: '首页',
      component: () => import('@/components/Index/Index'),
      children: [
        { path: '/Dashboard', name: '仪表盘', component: () => import('@/components/Dashboard/Dashboard') },
        { path: '/Foo', name: 'Foo', component: () => import('@/components/Foo/Foo') },
        { path: '/Bar', name: '柱状图', component: () => import('@/components/Charts/Bar') },
        { path: '/LineChart', name: '折线图', component: () => import('@/components/Charts/LineChart') },
        { path: '/Pie', name: '饼图', component: () => import('@/components/Charts/Pie') },
        { path: '/Demo', name: 'Demo表单', component: () => import('@/components/Forms/Demo') },
        { path: '/Register', name: '注册表单', component: () => import('@/components/Forms/Register') },
        { path: '/Forms', name: '基础表单', component: () => import('@/components/Forms/Forms') },
        { path: '/ComplexForm', name: '复杂表格', component: () => import('@/components/Forms/ComplexForm') },
        { path: '/EmployeeTable', name: '员工表', component: () => import('@/components/Tables/EmployeeTable') },
        { path: '/TeacherTable', name: '教师表', component: () => import('@/components/Tables/TeacherTable') },
        { path: '/TodoTable', name: '待办项表', component: () => import('@/components/Tables/TodoTable') },
        { path: '/Baz', name: 'Baz', component: () => import('@/components/Foo/Baz') },
        { path: '/Brand', name: 'Brand', component: () => import('@/components/Common/Brand/Brand') },
        { path: '/Org', name: 'Org', component: () => import('@/components/Common/Org/Org') },
        { path: '/User', name: 'User', component: () => import('@/components/Common/User/User') },
        { path: '/Menu', name: 'Menu', component: () => import('@/components/Common/Menu/Menu') },
        { path: '/Quartz', name: 'Quartz', component: () => import('@/components/Common/Quartz/Quartz') },
        { path: '/404', name: '404', hidden: true, component: () => import('@/components/Index/404') }
      ]
    },
    { path: '*', hidden: true, redirect: { path: '/404' } }
  ]
})
